home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / 3rdParty / ums.mod < prev   
Encoding:
Text File  |  1995-05-23  |  19.2 KB  |  620 lines

  1. (* UMS interface for Oberon-A
  2. ** Modified for Oberon-A Release 1.5 by Frank Copeland
  3. *)
  4.  
  5. <* STANDARD- *>
  6.  
  7. MODULE [2] ums;
  8.  
  9. IMPORT SYS := SYSTEM, Kernel, Utility, Exec, Intuition;
  10.  
  11. CONST
  12.   name = "ums.library";
  13.  
  14. VAR
  15.   base * : Exec.LibraryPtr;
  16.  
  17. TYPE
  18.   (* msgs are identified by the following type *)
  19.   NUM *         = LONGINT;
  20.  
  21.   (* general types *)
  22.  
  23. CONST
  24.   MaxMsgs *     = MAX(NUM);
  25.   NumFields *   = 128;
  26.  
  27. TYPE
  28.   APTR *        = Exec.APTR;
  29.   STRPTR* = Exec.STRPTR;
  30.  
  31.   oldMsg *      = ARRAY 16 OF STRPTR;
  32.   oldMsgPtr *   = POINTER TO oldMsg;
  33.  
  34.   MsgTextFields* = ARRAY NumFields OF STRPTR;
  35.   MessageInfo*  = RECORD
  36.                     hdrLen*     : LONGINT;
  37.                     txtLen*     : LONGINT;
  38.                     date*       : LONGINT;
  39.                     up*, dn*,
  40.                     lt*, rt*    : LONGINT;
  41.                     globalStat* : SET;
  42.                     userStat*   : SET;
  43.                     loginStat*  : SET;
  44.                     hardLink*   : LONGINT;
  45.                     softLink*   : LONGINT;
  46.                   END;
  47.  
  48. CONST
  49.  
  50.    (* enumeration of fields in an UMS-message *)
  51.  
  52.    msgText *    =  0;
  53.    fromName *   =  1;
  54.    fromAddr *   =  2;
  55.    toName *     =  3;
  56.    toAddr *     =  4;
  57.    msgID *      =  5;
  58.    creationDate*=  6;
  59.    receiveDate* =  7;
  60.    refID *      =  8;
  61.    group *      =  9;
  62.    subject *    = 10;
  63.    attributes * = 11;
  64.    comments *   = 12;
  65.    organization*= 13;
  66.    distribution*= 14;
  67.    folder*      = 15;
  68.    fidoID *     = 16;
  69.    mausID *     = 17;
  70.    replyGroup * = 18;
  71.    replyName *  = 19;
  72.    replyAddr *  = 20;
  73.    fidoText *   = 32;
  74.    errorText *  = 33;
  75.    newsreader * = 34;
  76.  
  77.  
  78.   (* user status-bits *)
  79.  
  80.   archive *   = 4;  (* msg should be archived, don't delete *)
  81.   junk *      = 5;  (* negative selection, inheritance suggested *)
  82.   postPoned * = 6;  (* to be read again, (but not now) *)
  83.   selected *  = 7;  (* positive selection, inheritance suggested *)
  84.   filtered *  = 15; (* msg has been processed by filter,
  85.                        'selected' and 'junk' have been properly set *)
  86.  
  87.   Old *         =  8; (* user has already read this Message *)
  88.   Read *        =  Old;
  89.   WriteAccess * =  9; (* user may change or delete this message *)
  90.   ReadAccess *  = 10; (* user may read this message *)
  91.   ViewAccess *  = 11; (* user may read the header of this message *)
  92.   Owner *       = 12; (* user 'owns' (wrote) this message *)
  93.  
  94.   ProtectedUserFlags*= {WriteAccess,ReadAccess,ViewAccess,Owner};
  95.  
  96.   (* global status-bits *)
  97.  
  98.   Deleted *     = 0; (* msg is really deleted *)
  99.   Expired *     = 1; (* msg has expired and may be deleted *)
  100.   Exported *    = 2; (* msg has been exported *)
  101.   Orphan *      = 3; (* msg could not be exported *)
  102.   Link *        = 4; (* within a ring of linked msgs *)
  103.   HardLink *    = 5; (* link is hardLink *)
  104.  
  105.   ProtectedGlobalFlags*= {Deleted,Exported,Orphan,Link,HardLink};
  106.  
  107. (*** Errors ***)
  108.  
  109. CONST
  110.   ok*           =  0;
  111.   unknown*      =  1;
  112.  
  113.   codeMissing*  = 100;
  114.   forbiddenCode*= 101;
  115.   noWriteAccess*= 102;
  116.   noReader*     = 103;
  117.   noExporter*   = 104;
  118.   badLink*      = 105;
  119.   noWork*       = 106;
  120.   noSysop*      = 107;
  121.   badChange*    = 108;
  122.  
  123.   dupe*         = 200;
  124.   noReadAccess* = 201;
  125.   noViewAccess* = 202;
  126.   msgCorrupted* = 203;
  127.   noHdrSpace*   = 204;
  128.   noSuchMsg*    = 205;
  129.   badName*      = 206;
  130.   badTag*       = 207;
  131.   missingTag*   = 208;
  132.   noSuchUser*   = 209;
  133.   notFound*     = 210;
  134.   autoBounce*   = 211;
  135.   msgDeleted*   = 212;
  136.   noNetAccess*  = 213;
  137.   badPattern*   = 214;
  138.   badVarname*   = 215;
  139.   fsFull*       = 216;
  140.   noMsgMem*     = 217;
  141.   missingIndex* = 218;
  142.  
  143.   serverTerminated*= 300;
  144.   cantWrite*    = 301;
  145.   cantRead*     = 302;
  146.   wrongMsgPtr*  = 303;
  147.   serverNotFree*= 304;
  148.   idCountProb*  = 305;
  149.   noLogin*      = 306;
  150.   wrongServer*  = 307;
  151.   noMem*        = 308;
  152.   wrongTask*    = 309;
  153.  
  154.  
  155.   (* tag-values *)
  156.  
  157.   typeSTRPTR    = 2000H;
  158.   typeVARPAR    = 4000H;
  159.  
  160.  
  161.   (** tags for WriteUMSMsg() **)
  162.  
  163.   (*  add 'typeVARPAR' for ReadUMSMsg()  *)
  164.   (*  no 'typeVARPAR' for WriteUMSMsg()  *)
  165.  
  166.   tagMsgNum *           =  1 + Utility.user;
  167.  
  168.   tagMsgDate *          =  4 + Utility.user;
  169.                                 (* don't usually use when writing!      *)
  170.                                 (* Using tagMsgDate with WriteUMSMsg()  *)
  171.                                 (* has a very special meaning.          *)
  172.   tagChainUp *          =  7 + Utility.user;
  173.   tagHardLink *         = 14 + Utility.user;
  174.   tagSoftLink *         = 15 + Utility.user;
  175.  
  176.   tagAutoBounce *       = 65 + Utility.user;
  177.                                 (* when writing:                                *)
  178.                                 (* data # 0: server returns error 'autoBounce', *)
  179.                                 (*           but still keeps the Msg and sends  *)
  180.                                 (*           it to the sysops.                  *)
  181.   tagHdrFill *          = 66 + Utility.user;
  182.                                 (* when writing: how much bytes to be reserved  *)
  183.   tagTxtFill *          = 67 + Utility.user;
  184.                                 (*               for header and text            *)
  185.   tagNoUpdate *         = 69 + Utility.user;
  186.                                 (* data = 0: (default) set 'Old'-Flag when      *)
  187.                                 (*           reading or writing                 *)
  188.                                 (* data = 1: don't touch 'Old'-Flag             *)
  189.   tagHide *             = 70 + Utility.user;
  190.                                 (* for writing:                                 *)
  191.                                 (* data = 0: default                            *)
  192.                                 (* data = 1: msg only accessible by exporters   *)
  193.                                 (* data = 2: msg only accessible by users       *)
  194.  
  195.   tagMsgText *          =  256 + typeSTRPTR + Utility.user;
  196.   tagFromName *         = tagMsgText + 1;
  197.   tagFromAddr *         = tagMsgText + 2;
  198.   tagToName *           = tagMsgText + 3;
  199.   tagToAddr *           = tagMsgText + 4;
  200.   tagMsgID *            = tagMsgText + 5;
  201.   tagCreationDate *     = tagMsgText + 6;
  202.   tagReceiveDate *      = tagMsgText + 7;
  203.   tagRefID *            = tagMsgText + 8;
  204.   tagGroup *            = tagMsgText + 9;
  205.   tagSubject *          = tagMsgText +10;
  206.   tagAttributes *       = tagMsgText +11;
  207.   tagComments *         = tagMsgText +12;
  208.   tagOrganization *     = tagMsgText +13;
  209.   tagDistribution *     = tagMsgText +14;
  210.   tagFolder *           = tagMsgText +15;
  211.   tagFidoID *           = tagMsgText +16;
  212.   tagMausID *           = tagMsgText +17;
  213.   tagReplyGroup *       = tagMsgText +18;
  214.   tagReplyName *        = tagMsgText +19;
  215.   tagReplyAddr *        = tagMsgText +20;
  216.   tagFidoText *         = tagMsgText +32;
  217.   tagErrorText *        = tagMsgText +33;
  218.   tagNewsreader *       = tagMsgText +34;
  219.  
  220.   (* tagMsgText+15 .. tagMsgText+127 are also usable as text-fields *)
  221.  
  222.   tagTextFields *       = 513 + Utility.user;
  223.                                 (* datatype: POINTER TO MsgTextFields *)
  224.  
  225.  
  226.   (** tags for ReadUMSMsg() **)
  227.  
  228.   (*  add 'typeVARPAR' for ReadUMSMsg()  *)
  229.   (*  no 'typeVARPAR' for WriteUMSMsg()  *)
  230.  
  231.   tagRMsgNum *          =  1 + Utility.user;
  232.  
  233.   tagRHdrLength *       =  2 + Utility.user + typeVARPAR;
  234.   tagRTxtLength *       =  3 + Utility.user + typeVARPAR;
  235.   tagRMsgDate *         =  4 + Utility.user + typeVARPAR;
  236.   tagRChainUp *         =  7 + Utility.user + typeVARPAR;
  237.   tagRChainDn *         =  8 + Utility.user + typeVARPAR;
  238.   tagRChainLt *         =  9 + Utility.user + typeVARPAR;
  239.   tagRChainRt *         = 10 + Utility.user + typeVARPAR;
  240.   tagRGlobalFlags *     = 11 + Utility.user + typeVARPAR;
  241.   tagRUserFlags *       = 12 + Utility.user + typeVARPAR;
  242.   tagRLoginFlags *      = 13 + Utility.user + typeVARPAR;
  243.   tagRHardLink *        = 14 + Utility.user + typeVARPAR;
  244.   tagRSoftLink *        = 15 + Utility.user + typeVARPAR;
  245.  
  246.   tagRDateStyle *       = 64 + Utility.user;
  247.                                 (* style for receiveDate when reading:          *)
  248.                                 (* data = 0: no receiveDate                     *)
  249.                                 (* data = 1: emulate old-style receiveDate      *)
  250.   tagRIDStyle *         = 68 + Utility.user;
  251.                                 (* style for Message-ID                         *)
  252.                                 (* data = 0: real Message-ID                    *)
  253.                                 (* data = 1: old style dec-number               *)
  254.   tagRNoUpdate *        = 69 + Utility.user;
  255.                                 (* data = 0: (default) set 'Old'-Flag when      *)
  256.                                 (*           reading or writing                 *)
  257.                                 (* data = 1: don't touch 'Old'-Flag             *)
  258.  
  259.   tagRMsgText *         =  256 + typeSTRPTR + typeVARPAR + Utility.user;
  260.   tagRFromName *        = tagRMsgText + 1;
  261.   tagRFromAddr *        = tagRMsgText + 2;
  262.   tagRToName *          = tagRMsgText + 3;
  263.   tagRToAddr *          = tagRMsgText + 4;
  264.   tagRMsgID *           = tagRMsgText + 5;
  265.   tagRCreationDate *    = tagRMsgText + 6;
  266.   tagRReceiveDate *     = tagRMsgText + 7;
  267.   tagRRefID *           = tagRMsgText + 8;
  268.   tagRGroup *           = tagRMsgText + 9;
  269.   tagRSubject *         = tagRMsgText +10;
  270.   tagRAttributes *      = tagRMsgText +11;
  271.   tagRComments *        = tagRMsgText +12;
  272.   tagROrganization *    = tagRMsgText +13;
  273.   tagRDistribution *    = tagRMsgText +14;
  274.   tagRFolder *          = tagRMsgText +15;
  275.   tagRFidoID *          = tagRMsgText +16;
  276.   tagRMausID *          = tagRMsgText +17;
  277.   tagRReplyGroup *      = tagRMsgText +18;
  278.   tagRReplyName *       = tagRMsgText +19;
  279.   tagRReplyAddr *       = tagRMsgText +20;
  280.   tagRFidoText *        = tagRMsgText +32;
  281.   tagRErrorText *       = tagRMsgText +33;
  282.   tagRNewsreader *      = tagRMsgText +34;
  283.  
  284.   (* tagRMsgText+15 .. tagRMsgText+127 are also usable as text-fields *)
  285.  
  286.   tagRMsgInfo *         = 512 + Utility.user;
  287.                                 (* datatype: POINTER TO MessageInfo *)
  288.   tagRTextFields *      = tagRMsgInfo + 1;
  289.                                 (* datatype: POINTER TO MsgTextFields *)
  290.  
  291.   tagRReadHeader *      = tagRMsgInfo + 2;
  292.                                 (* read all header-fields *)
  293.   tagRReadAll *         = tagRMsgInfo + 3;
  294.                                 (* read all text-fields *)
  295.  
  296.  
  297.   (** tags for UMSSelect()  **)
  298.  
  299.   tagSelSet *           = 1024 + Utility.user;
  300.                                 (* flags to set on selected msgs *)
  301.   tagSelUnset *         = tagSelSet + 1;
  302.                                 (* flags to clear *)
  303.   tagSelWriteGlobal *   = tagSelSet + 2;
  304.                                 (* change global flags, not user-flags *)
  305.   tagSelWriteLocal *    = tagSelSet + 3;
  306.                                 (* change login-local flags, not user-flags *)
  307.   tagSelWriteUser *     = tagSelSet + 4+typeSTRPTR;
  308.                                 (* change other user's flags *)
  309.  
  310.   tagSelStart *         = tagSelSet + 8;
  311.                                 (* process only msgs AFTER this one *)
  312.   tagSelStop *          = tagSelSet + 9;
  313.                                 (* process only msgs BEFORE this one *)
  314.  
  315.   (* the following are mutual-exclusiv *)
  316.   (*   use only one of the following operations,   *)
  317.   (*   otherwise unpredictable things may happen!  *)
  318.  
  319.   tagSelReadGlobal *    = tagSelSet +10;
  320.                                 (* examine global flags, not user-flags *)
  321.   tagSelReadLocal *     = tagSelSet +11;
  322.                                 (* examine login-local flags, not user-flags *)
  323.   tagSelReadUser *      = tagSelSet +12+typeSTRPTR;
  324.                                 (* examine other user's flags *)
  325.   tagSelMask *          = tagSelSet +16;
  326.                                 (* select msgs, that's flags    *)
  327.   tagSelMatch *         = tagSelSet +17;
  328.                                 (*   ANDed with mask equal match *)
  329.   tagSelParent *        = tagSelSet +18;
  330.                                 (* examine parent's flags *)
  331.  
  332.   tagSelDate *          = tagSelSet +19;
  333.                                 (* select msgs younger than this date *)
  334.  
  335.   tagSelTree *          = tagSelSet +20;
  336.                                 (* select whole tree this msg is in *)
  337.  
  338.   tagSelSubTree *       = tagSelSet +21;
  339.                                 (* select sub-tree this msg is root of *)
  340.  
  341.   tagSelMsg *           = tagSelSet +22;
  342.                                 (* select a msg specified by number *)
  343.  
  344.   tagSelQuick *         = tagSelSet +23;
  345.                                 (* quick select enabled *)
  346.   (* tagMsgText .. tagMsgText+127 are also allowed for selecting *)
  347.  
  348.  
  349.   (** tags for UMSSearch() **)
  350.  
  351.   tagSearchLast *       = 2048 + Utility.user;
  352.                                 (* number of LAST msg not to search *)
  353.   tagSearchQuick *      = tagSearchLast+ 1;
  354.                                 (* quick searches enabled *)
  355.  
  356.   tagSearchGlobal *     = tagSearchLast+ 2;
  357.                                 (* examine global flags instead of user-flags*)
  358.   tagSearchLocal *      = tagSearchLast+ 3;
  359.                                 (* examine login-local flags, not user-flags *)
  360.   tagSearchUser *       = tagSearchLast+ 4+typeSTRPTR;
  361.                                 (* examine other user's flags *)
  362.   tagSearchDirection *  = tagSearchLast+ 5;
  363.                                 (* set search direction *)
  364.                                 (*  0 = default  *)
  365.                                 (*  1 = forward  *)
  366.                                 (* -1 = backward *)
  367.   tagSearchPattern *    = tagSearchLast + 6;
  368.                                 (* string in tagMsgText .. tagMsgText+127 is: *)
  369.                                 (* 0: no pattern, just a plain string    *)
  370.                                 (* 1: an AmigaDOS style pattern          *)
  371.                                 (* 2: a pattern, only if it contains     *)
  372.                                 (*    wildcards ('auto-detect patterns') *)
  373.  
  374.   tagSearchMask *       = tagSearchLast+16;
  375.                                 (* search a msg, that's flags   *)
  376.   tagSearchMatch *      = tagSearchLast+17;
  377.                                 (*   ANDed with mask equal match *)
  378.  
  379.   (* tagMsgText .. tagMsgText+127 are also allowed for searching *)
  380.  
  381.  
  382.   (**  tags for ReadUMSConfig(), WriteUMSConfig()  **)
  383.  
  384.   tagCfgGlobalOnly *    = 3072 + Utility.user;
  385.                                 (* read or write only global config,         *)
  386.                                 (* thus must not be combined with tagCfgUser *)
  387.   tagCfgName *          = tagCfgGlobalOnly+ 1 + typeSTRPTR;
  388.                                 (* name of config var to read or write       *)
  389.   tagCfgUser *          = tagCfgGlobalOnly+ 2 + typeSTRPTR;
  390.                                 (* name of user to read/write locals from/to *)
  391.  
  392.  
  393.   (**  tags for ReadUMSConfig()  **)
  394.  
  395.   tagCfgUserName *      = tagCfgGlobalOnly+ 3 + typeSTRPTR;
  396.                                 (* alias to get realname from                *)
  397.   tagCfgNextVar *       = tagCfgGlobalOnly+ 4 + typeSTRPTR;
  398.                                 (* get name of next var                      *)
  399.  
  400.  
  401.   (**  tags for WriteUMSConfig()  **)
  402.  
  403.   tagCfgDump *          = tagCfgGlobalOnly+16 + typeSTRPTR;
  404.                                 (* write current settings to a file *)
  405.   tagCfgData *          = tagCfgGlobalOnly+17 + typeSTRPTR;
  406.                                 (* data to write to specified var   *)
  407.  
  408.  
  409.  
  410.   (***  functions ***)
  411.  
  412. PROCEDURE Login* [base,-30]
  413.   ( user[2]   : ARRAY OF CHAR;
  414.     passwd[3]  : ARRAY OF CHAR )
  415.   : LONGINT;
  416.  
  417. PROCEDURE Logout* [base,-36]
  418.   ( account[2]    : LONGINT );
  419.  
  420. PROCEDURE DumpConfig* [base,-114]
  421.   ( account[2]: LONGINT );
  422.  
  423. PROCEDURE ErrNum* [base,-120]
  424.   ( account[2]: LONGINT )
  425.   : INTEGER;
  426.  
  427. PROCEDURE ErrTxt* [base,-126]
  428.   ( account[2]: LONGINT )
  429.   : STRPTR;
  430.  
  431. PROCEDURE DeleteMsg* [base,-132]
  432.   ( account[2]: LONGINT;
  433.     MsgNum[3] : NUM )
  434.   : BOOLEAN;
  435.  
  436. PROCEDURE ChangeAttributes* [base,-138]
  437.   ( account[2]: LONGINT;
  438.     MsgNum[3] : NUM;
  439.     att[4]    : ARRAY OF CHAR )
  440.   : BOOLEAN;
  441.  
  442. PROCEDURE NextStatus* [base,-144]
  443.   ( account[2]: LONGINT;
  444.     from[3]   : NUM;
  445.     mask[4]   : SET;
  446.     status[5] : SET )
  447.   : NUM;
  448.  
  449. PROCEDURE SetStatus* [base,-162]
  450.   ( acc[2]   : LONGINT;
  451.     MsgNum[3] : NUM;
  452.     unset[4]  : SET;
  453.     set[5]: SET);
  454.  
  455. PROCEDURE PrevStatus* [base,-168]
  456.   ( acc[2]   : LONGINT;
  457.     from[3]   : NUM;
  458.     mask[4]   : SET;
  459.     status[5] : SET )
  460.   : NUM;
  461.  
  462. PROCEDURE SelStatus* [base,-174]
  463.   ( acc[2]   : LONGINT;
  464.     set[3]    : SET;
  465.     unset[4]  : SET;
  466.     mask[5]   : SET;
  467.     status[6] : SET )
  468.    : NUM;
  469.  
  470. PROCEDURE SelGroup* [base,-180]
  471.   ( acc[2]   : LONGINT;
  472.     set[3]    : SET;
  473.     unset[4]  : SET;
  474.     group[5]  : ARRAY OF CHAR )
  475.   : NUM;
  476.  
  477. PROCEDURE GetStatus* [base,-186]
  478.   ( acc[2]   : LONGINT;
  479.     MsgNum[3] : LONGINT )
  480.   : SET;
  481.  
  482. PROCEDURE FlushUMS* [base,-192] ();
  483.  
  484. PROCEDURE CleanMB* [base,-198] () : INTEGER;
  485.  
  486. PROCEDURE QuitUMS* [base,-204] ();
  487.  
  488.  
  489. (*** V8: ***)
  490.  
  491. PROCEDURE UMSARexxQuery* [base,-210] ();
  492.  
  493. (*** V9: ***)
  494.  
  495. PROCEDURE ExportedMsg* [base,-234]
  496.   ( acc[2]   : LONGINT;
  497.     num[3]    : LONGINT );
  498.  
  499. PROCEDURE CannotExport* [base,-240]
  500.   ( acc[2]   : LONGINT;
  501.     num[3]    : LONGINT;
  502.     error[4]  : ARRAY OF CHAR )
  503.   : BOOLEAN;
  504.  
  505. PROCEDURE LogUMS* [base,-246]
  506.   ( acc[2]   : LONGINT;
  507.     level[4]  : LONGINT;
  508.     format[5] : ARRAY OF CHAR;
  509.     args[6]   : ARRAY OF SYS.BYTE );
  510.  
  511. PROCEDURE LogUms* [base,-246]
  512.   ( acc[2]   : LONGINT;
  513.     level[4]  : LONGINT;
  514.     format[5] : ARRAY OF CHAR;
  515.     args[6].. : LONGINT );
  516.  
  517. PROCEDURE UMSRLogin* [base,-252]
  518.   ( server[2]    : ARRAY OF CHAR;
  519.     user[3]   : ARRAY OF CHAR;
  520.     passwd[4] : ARRAY OF CHAR )
  521.   : LONGINT;
  522.  
  523. PROCEDURE WriteUMSMsg* [base,-258]
  524.   ( acc[2]   : LONGINT;
  525.     tagItems[3]: ARRAY OF Utility.TagItem )
  526.   : LONGINT;
  527.  
  528. PROCEDURE WriteUMSMsgTags* [base,-258]
  529.   ( acc[2]   : LONGINT;
  530.     tagItems[3]..: Utility.Tag )
  531.   : LONGINT;
  532.  
  533. PROCEDURE ReadUMSMsg* [base,-264]
  534.   ( acc[2]   : LONGINT;
  535.     tagItems[3]: ARRAY OF Utility.TagItem )
  536.   : BOOLEAN;
  537.  
  538. PROCEDURE ReadUMSMsgTags* [base,-264]
  539.   ( acc[2]   : LONGINT;
  540.     tagItems[3]..: Utility.Tag )
  541.   : LONGINT;
  542.  
  543. PROCEDURE FreeUMSMsg* [base,-270]
  544.   ( acc[2]   : LONGINT;
  545.     msgNum[3] : LONGINT );
  546.  
  547. PROCEDURE UMSSelect* [base,-276]
  548.   ( acc[2]   : LONGINT;
  549.     tagItems[3]: ARRAY OF Utility.TagItem )
  550.   : LONGINT;
  551.  
  552. PROCEDURE UMSSelectTags* [base,-276]
  553.   ( acc[2]   : LONGINT;
  554.     tagItems[3]..: Utility.Tag )
  555.   : LONGINT;
  556.  
  557. PROCEDURE UMSSearch* [base,-282]
  558.   ( acc[2]   : LONGINT;
  559.     tagItems[3]: ARRAY OF Utility.TagItem )
  560.   : LONGINT;
  561.  
  562. PROCEDURE UMSSearchTags* [base,-282]
  563.   ( acc[2]   : LONGINT;
  564.     tagItems[3]..: Utility.Tag )
  565.   : LONGINT;
  566.  
  567. PROCEDURE ReadUMSConfig* [base,-288]
  568.   ( acc[2]: LONGINT;
  569.     tagItems[3]: ARRAY OF Utility.TagItem )
  570.   : STRPTR;
  571.  
  572. PROCEDURE ReadUMSConfigTags* [base,-288]
  573.   ( acc[2]: LONGINT;
  574.     tagItems[3]..: Utility.Tag )
  575.   : STRPTR;
  576.  
  577. PROCEDURE FreeUMSConfig* [base,-294]
  578.   ( acc[2]   : LONGINT;
  579.     str[3]    : STRPTR);
  580.  
  581. PROCEDURE WriteUMSConfig* [base,-300]
  582.   ( acc[2]: LONGINT;
  583.     tagItems[3]: ARRAY OF Utility.TagItem )
  584.   : BOOLEAN;
  585.  
  586. PROCEDURE WriteUMSConfigTags* [base,-300]
  587.   ( acc[2]: LONGINT;
  588.     tagItems[3]..: Utility.Tag )
  589.   : BOOLEAN;
  590.  
  591. PROCEDURE PrivateServerCall* [base,-306]
  592.   ( command[2]: LONGINT;
  593.     arg[3]    : APTR )
  594.   : LONGINT;
  595.  
  596. <*$LongVars-*>
  597.  
  598. (*-----------------------------------*)
  599. PROCEDURE* [0] CloseLib (VAR rc : LONGINT);
  600.  
  601. BEGIN
  602.   IF base # NIL THEN Exec.CloseLibrary (base) END;
  603. END CloseLib;
  604.  
  605. (*-----------------------------------*)
  606. PROCEDURE [0] OpenLib * (mustOpen : BOOLEAN);
  607.  
  608. BEGIN
  609.   IF base = NIL THEN
  610.     base := Exec.OpenLibrary (name, 0);
  611.     IF base # NIL THEN Kernel.SetCleanup (CloseLib)
  612.     ELSIF mustOpen THEN HALT (100)
  613.     END
  614.   END
  615. END OpenLib;
  616.  
  617. BEGIN
  618.   base := NIL
  619. END ums.
  620.